import { JsonUtil } from "db://app-game/core/utils/JsonUtil";
import { DBRoleType } from "./DBRole.type";

export class DBRole {
  /** 表单名称 */
  static DBName = "Role";
  /** 表单数据 */
  data: DBRoleType = null!;

  init(id: number) {
    let db = JsonUtil.get(DBRole.DBName) as DBRoleType[];
    this.data = db.find((v) => v.id === id)!;
  }
}
